]> dgit.raspbian.org Git - gnome-shell.git/commit
st: Avoid integer overflow on unpremultiply
authorFlorian Müllner <fmuellner@gnome.org>
Thu, 22 Nov 2018 19:41:44 +0000 (20:41 +0100)
committerFlorian Müllner <florian.muellner@gmail.com>
Tue, 4 Dec 2018 15:55:39 +0000 (15:55 +0000)
commit925a25da17986bf60f61bb4e06ec22e2c59fa14f
tree21dfc31d8cabdd7c9bd0469526940c8a69c17c21
parent6743c18fdfa6dc48fb7d920640debe863018dd38
st: Avoid integer overflow on unpremultiply

When computing the effective border color, we operate on colors with
premultiplied alpha to simplify the calculations, then unpremultiply
the result. However we miss a bounds check in the last check, so any
color component can overflow the allowed maximum of 0xff and shift the
result in unexpected ways.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/305
src/st/st-theme-node-drawing.c